#!/usr/bin/python

'''judge user exist or not exist'''

import subprocess
f_passwd = subprocess.getoutput("cat /etc/passwd")
f_line = f_passwd.splitlines()
'''
a = []
for i in f_lines:
#    a.append(i.split(":")[0])
'''
a = [x.split(":")[0] for x in f_line]
u_name = input("please input a user name:")
if u_name in a:
    print("user is %s is exist"%u_name)
else:
    print("user is %s is not exist"%u_name)